//
//  CompressFilesManager.h
//  Runner
//
//  Created by 显铭 on 2020/4/21.
//  Copyright © 2020 The Chromium Authors. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <Photos/Photos.h>
#import <Flutter/Flutter.h>

NS_ASSUME_NONNULL_BEGIN

@interface CompressManager : NSObject
+ (instancetype)shareInstance;

/// 获取缩略图
- (void)getVideoImageFromPHAsset:(PHAsset *)asset forSize:(CGSize)size
             completedResultBack:(void (^)(UIImage *image))resultCallback;

/// 压缩视频
- (void)compressVideo:(AVURLAsset *)videoAsset whenSuccess:(void(^)(NSString *compressedPath))successHandler  progressHandler:(void(^)(float progress))progressHandler failure:(void(^)(NSError *error))failure;

///取消压缩
- (void)cancelCompressing;

@end

NS_ASSUME_NONNULL_END
